package org.travel.app.common.util;
import java.util.Random;


/**
 * @author nmm
 * @date 2024-12-2024/12/2
 * @deriction  用于生成前段验证码的工具类
 */
public class VerificationCodeUtil {
    /**
     * 随机生成6为数字验证码
      * @return
     */
    public static String generateCode() {
        Random random = new Random();
        String result="";
        for (int i=0;i<6;i++)
        {
            result+=random.nextInt(10);
        }
        return result;
    }

}